﻿// Type: System.Web.UI.WebControls.DataControlField
// Assembly: System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// Assembly location: C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.Web.dll

using System.Collections.Specialized;
using System.ComponentModel;
using System.Drawing.Design;
using System.Runtime;
using System.Web;
using System.Web.UI;

namespace System.Web.UI.WebControls
{
    [DefaultProperty("HeaderText")]
    [TypeConverter(typeof (ExpandableObjectConverter))]
    public abstract class DataControlField : IStateManager, IDataSourceViewSchemaAccessor
    {
        [WebCategory("Accessibility")]
        [WebSysDescription("DataControlField_AccessibleHeaderText")]
        [Localizable(true)]
        [DefaultValue("")]
        public virtual string AccessibleHeaderText { get; set; }

        [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
        [PersistenceMode(PersistenceMode.InnerProperty)]
        [DefaultValue(null)]
        [WebCategory("Styles")]
        [WebSysDescription("DataControlField_ControlStyle")]
        public Style ControlStyle { get; }

        protected internal virtual ValidateRequestMode ValidateRequestMode { get; set; }

        protected Control Control { [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
        get; }

        protected bool DesignMode { get; }

        [WebSysDescription("DataControlField_FooterStyle")]
        [WebCategory("Styles")]
        [PersistenceMode(PersistenceMode.InnerProperty)]
        [DefaultValue(null)]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
        public TableItemStyle FooterStyle { get; }

        [WebCategory("Appearance")]
        [WebSysDescription("DataControlField_FooterText")]
        [Localizable(true)]
        [DefaultValue("")]
        public virtual string FooterText { get; set; }

        [WebCategory("Appearance")]
        [DefaultValue("")]
        [Editor("System.Web.UI.Design.ImageUrlEditor, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof (UITypeEditor))]
        [WebSysDescription("DataControlField_HeaderImageUrl")]
        [UrlProperty]
        public virtual string HeaderImageUrl { get; set; }

        [WebSysDescription("DataControlField_HeaderStyle")]
        [DefaultValue(null)]
        [PersistenceMode(PersistenceMode.InnerProperty)]
        [WebCategory("Styles")]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
        public TableItemStyle HeaderStyle { get; }

        [WebSysDescription("DataControlField_HeaderText")]
        [WebCategory("Appearance")]
        [Localizable(true)]
        [DefaultValue("")]
        public virtual string HeaderText { get; set; }

        [WebSysDescription("DataControlField_InsertVisible")]
        [WebCategory("Behavior")]
        [DefaultValue(true)]
        public virtual bool InsertVisible { get; set; }

        [WebSysDescription("DataControlField_ItemStyle")]
        [DefaultValue(null)]
        [WebCategory("Styles")]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
        [PersistenceMode(PersistenceMode.InnerProperty)]
        public TableItemStyle ItemStyle { get; }

        [DefaultValue(true)]
        [WebSysDescription("DataControlField_ShowHeader")]
        [WebCategory("Behavior")]
        public virtual bool ShowHeader { get; set; }

        [WebCategory("Behavior")]
        [WebSysDescription("DataControlField_SortExpression")]
        [DefaultValue("")]
        [TypeConverter("System.Web.UI.Design.DataSourceViewSchemaConverter, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
        public virtual string SortExpression { get; set; }

        protected StateBag ViewState { [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
        get; }

        [WebSysDescription("DataControlField_Visible")]
        [WebCategory("Behavior")]
        [DefaultValue(true)]
        public bool Visible { get; set; }

        protected bool IsTrackingViewState { [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
        get; }

        #region IDataSourceViewSchemaAccessor Members

        object IDataSourceViewSchemaAccessor.DataSourceViewSchema { get; set; }

        #endregion

        #region IStateManager Members

        [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
        void IStateManager.LoadViewState(object state);

        [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
        void IStateManager.TrackViewState();

        [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
        object IStateManager.SaveViewState();

        bool IStateManager.IsTrackingViewState { [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
        get; }

        #endregion

        protected internal DataControlField CloneField();
        protected virtual void CopyProperties(DataControlField newField);
        protected abstract DataControlField CreateField();
        public virtual void ExtractValuesFromCell(IOrderedDictionary dictionary, DataControlFieldCell cell, DataControlRowState rowState, bool includeReadOnly);
        public virtual bool Initialize(bool sortingEnabled, Control control);
        public virtual void InitializeCell(DataControlFieldCell cell, DataControlCellType cellType, DataControlRowState rowState, int rowIndex);
        protected virtual void LoadViewState(object savedState);
        protected virtual void OnFieldChanged();
        protected virtual object SaveViewState();
        public override string ToString();
        protected virtual void TrackViewState();
        public virtual void ValidateSupportsCallback();
    }
}
